package com.lijie.ljblog.service;

import com.lijie.ljblog.model.Person;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lijie.ljblog.util.Result;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.HashMap;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lijie
 * @since 2021-08-28
 */
public interface PersonService extends IService<Person> {
    Result<Person> login(Person person) throws Exception;



    Result<Integer> getRejisterNums() throws Exception;
    /** 验证邮箱是否被使用
     * @Title: PersonService
     * @Description: ()
     * @Author:lijie
     * @since 2021/12/3 10:54
     * @Version:1.1.0
     */
    Boolean checkEmailUsed(Person person) throws Exception;

    /**
     * 像邮箱发送随机验证码，并上传redis
     * @param email
     * @throws Exception
     */
    void emailVerification(String email) throws Exception;

    /** 用户注册
     * @Title: PersonService
     * @Description: ()
     * @Author:lijie
     * @since 2021/12/3 10:54
     * @Version:1.1.0
     */
    Boolean personRegister(Person person) throws Exception;

    Boolean forgetPassword(Person person)throws Exception;

    boolean headUpload(MultipartHttpServletRequest mulRequest, HttpServletRequest request) throws IOException;

    Result<Person> getPerson(Person person);
}
